package chemistry;

@SuppressWarnings("rawtypes")
public class Element implements Comparable {
	private String name;
	private int number;
	private String symbol;
	private double mass;
	private double boil;
	private double melt;
	private double densityVapor;
	private double fusion;
	private double electronegativity;
	private double crustPercent;
	private double ionizationEnergy;
	private int charge;
	private int atomicRadius;
	
	public Element(String name, int number, String symbol, double mass, double boil, double melt,
			double densityVapor, double fusion, double electronegativity, double crustPercent,
			double ionizationEnergy, int charge, int atomicRadius) {
		this.name = name;
		this.number = number;
		this.symbol = symbol;
		this.mass = mass;
		this.boil = boil;
		this.melt = melt;
		this.densityVapor = densityVapor;
		this.fusion = fusion;
		this.electronegativity = electronegativity;
		this.crustPercent = crustPercent;
		this.ionizationEnergy = ionizationEnergy;
		this.charge = charge;
		this.atomicRadius = atomicRadius;
	}

	public void setNumber(int number) {
		this.number = number;
	}

	public int getNumber() {
		return number;
	}
	
	public void setIonizationEnergy(double ionizationEnergy) {
		this.ionizationEnergy = ionizationEnergy;
	}

	public double getIonizationEnergy() {
		return ionizationEnergy;
	}

	public void setCrustPercent(double crustPercent) {
		this.crustPercent = crustPercent;
	}

	public double getCrustPercent() {
		return crustPercent;
	}

	public void setElectronegativity(double electronegativity) {
		this.electronegativity = electronegativity;
	}

	public double getElectronegativity() {
		return electronegativity;
	}

	public void setFusion(double fusion) {
		this.fusion = fusion;
	}

	public double getFusion() {
		return fusion;
	}

	public void setDensityVapor(double densityVapor) {
		this.densityVapor = densityVapor;
	}

	public double getDensityVapor() {
		return densityVapor;
	}

	public void setMelt(double melt) {
		this.melt = melt;
	}

	public double getMelt() {
		return melt;
	}

	public void setBoil(double boil) {
		this.boil = boil;
	}

	public double getBoil() {
		return boil;
	}

	public void setMass(double mass) {
		this.mass = mass;
	}

	public double getMass() {
		return mass;
	}
	
	public void setSymbol(String symbol) {
		this.symbol = symbol;
	}

	public String getSymbol() {
		return symbol;
	}
	
	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}
	
	public void setCharge(int charge) {
		this.charge = charge;
	}

	public int getCharge() {
		return charge;
	}
	
	public void setAtomicRadius(int atomicRadius) {
		this.atomicRadius = atomicRadius;
	}

	public int getAtomicRadius() {
		return atomicRadius;
	}

	public String toString() {
		return this.name;
	}
	
	public String simpleDescription(){//returns the element in this form: Name Number Symbol Mass
		return (this.name + " " + this.number + " " + this.symbol + " " + this.mass);
	}
	
	public boolean equals(Object e){
		return this.number == ((Element)e).number;
	}
	
	public int compareTo(Object obj) {
		if(!(obj instanceof Element)) {
			throw new IllegalArgumentException();
		} else {
			return this.number - ((Element)obj).number;
		}
	}
}